package com.baidu.acg.industry.bigdata.config;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;

@Data
@Configuration
public class ApplicationConfiguration {

    @Value("${model.train.name}")
    private String modelTrainName;

    @Value("${model.container.host.path}")
    private String modelContainerHostPath;

    @Value("${model.container.volume.path}")
    private String modelContainerVolumePath;

    @Value("${model.image.version}")
    private String modelImageVersion;

    @Value("${model.default.work.path}")
    private String modelDefaultWorkPath;

    @Value("${minio.endpoint}")
    private String minioEndpoint;

    @Value("${minio.ak}")
    private String minioAK;

    @Value("${minio.sk}")
    private String minioSK;
    @Value("${minio.bucket.name}")
    private String bucketName;
    @Value("${minio.bucket.path}")
    private String minioBucketPath;
    @Value("${minio.yongji.model.prefix}")
    private String minioYongjiModelPrefix;

    @Value("${model.eval.max_out_points}")
    private String modelEvalMaxOutPoints;
    @Value("${model.train.max_out_points}")
    private String modelTrainEvalMaxOutPoints;

    @Value("${model.container.host.input.path}")
    private String modelContainerHostInputPath;
    @Value("${model.container.volume.input.path}")
    private String modelContainerVolumeInputPath;


    @Value("${minio.output.path}")
    private String minioOutputPath;
    @Value("${model.train.path}")

    private String modelTrainMinioPath;
    @Value("${model.train.log.path}")
    private String modelTrainPath;

    @Value("${model.container.file}")
    private String modelContainerFile;


    @Value("${pre.deal.model.file}")
    private String preDealModelFilePath;

    @Value("${model.host.file}")
    private String modelHostFile;

    @Value("${minio.remote.path}")
    private String minioRemotePath;


    @Value("${model.generate.txt.path}")
    private String modelGenerateTxtPath;
    /**
     * 四方模型配置
     */
    @Value("${model.pdparams.length}")
    private double length;

    @Value("${model.pdparams.width}")
    private double width;

    @Value("${model.pdparams.height}")
    private double height;

    @Value("${model.pdparams.clearance}")
    private double clearance;

    @Value("${model.pdparams.slant}")
    private double slant;

    @Value("${model.pdparams.radius}")
    private double radius;

    @Value("${model.pdparams.velocity}")
    private double velocity;
    @Value("${model.pdparams.re}")
    private Double re;
    @Value("${model.pdparams.referenceArea}")
    private double referenceArea;
    @Value("${model.pdparams.density}")
    private double density;
    @Value("${model.pdparams.computeNormal}")
    private boolean computeNormal;

    @Value("${minio.sifang.train.json}")
    private String minioSiFangTrainJson;
    @Value("${minio.sifang.train.vtu}")
    private String minioSiFangTrainVtu;
    @Value("${minio.sifang.train.log}")
    private String minioSiFangTrainLog;

    /**
     * 子采样率（控制数据采样密度，默认值 12）
     */
    @Value("${infer.subsample}")
    private int inferSubsample;

    @Value("${train.subsample}")
    private int trainSubsample;

    @Value("${eval.subsample}")
    private int evalSubsample;

    /**
     * 输出点的最大数量（防止内存溢出，默认值 5000）
     */
    @Value("${infer.max_out_points}")
    private int  inferMaxOutPoints;

    /**
     * 模型运行所在资源
     */
    @Value("${cuda.visble.devices}")
    private String cudaVisbleDevices;


    @Value("${minio.sifang.model.prefix}")
    private String minioSiFangFolderPrefix;

}
